<?php
/**
 * @return
 * @author 朱乐斌
 * @date
 */

namespace app\api\controller;

use app\api\model\TalentPolicyModel;
use app\controller\api\Base;

class TalentPolicy extends BaseController
{
    // 获取人才政策列表
    public function talentPolicyList()
    {
        $limit = $this->request->get('limit');
        if (empty($limit)){
            $limit = 5;
        }
        $talentPolicy = new TalentPolicyModel();
        $talentPolicy = $talentPolicy->field('title,create_time')->select();
        $this->success($talentPolicy);
    }
    // 获取人才政策详细
    public function talentPolicyDetail()
    {
        $id = $this->request->post('id/s');
        $talentPolicy = new TalentPolicyModel();
        $talentPolicy = $talentPolicy->where('id','=',$id)->field('title,content,create_time')->find();
        $this->success($talentPolicy);
    }
}